#ifndef DESKTOPPICTUREFRAME_H
#define DESKTOPPICTUREFRAME_H

#include <Windows.h>
#include <WindowsX.h>
#include <gdiplus.h>

#include "CustomWindow.h"
#include "CassiopeiaComponent.h"
#include "Translation.h"
#include "Settings.h"

using namespace Gdiplus;
using namespace Translation;

class DesktopPictureFrame :	public CassiopeiaComponent, public CustomWindow
{
public:
	DesktopPictureFrame();
	~DesktopPictureFrame();
	void Create(HINSTANCE hInstance);
	CCState Activate();
	CCState Deactivate();
	void SetPicture(tstring filename, bool copy);

private:
	Image* image;
	double imageRatio;

	bool sizing;
	RECT sizingRect;
	int imageOffset;

	bool CopyPicture(tstring fileName, tstring copyFileName);
	HRESULT ShowOpenFileDialog(HWND hwnd, LPTSTR * fileName);
	static LRESULT CALLBACK WndProc(LPVOID sender, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	 
};

#endif